import yaml

def load_port(path):
    # 先打开文件，再用safe_load读取文件内容
    with open(path, 'r', encoding='utf-8') as f:
        config = yaml.safe_load(f)
    return config
